package com.chujian.system.sys.service.impl;

import cn.hutool.crypto.SecureUtil;
import com.chujian.system.sys.service.IPasswordGen;
import org.springframework.stereotype.Component;

@Component
public class Md5PasswordGen implements IPasswordGen {

    @Override
    public String genPassword(String password, String salt) {
        return SecureUtil.md5(password + salt);
    }


    public static void main(String[] args) {
        System.out.println(new Md5PasswordGen().genPassword("111", "1234"));
    }

}
